﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<BlogPlat.Model.Tag>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Admin Tags - BlogPlat.NET - .NET Blogging Platform
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Tags</h2>

    <table width="1000" cellspacing="1">
        <tr>
            <td colspan="5" class="createtd">
                <%: Html.ActionLink("Create New", "create") %>
            </td>
        </tr>
        <tr>
            <th></th>
            <th></th>
            <th>
                Posts
            </th>
            <th>
                TagName
            </th>
            <th>
                FriendlyUrl
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td align="center" width="16">
                <a title="Edit" href="<%: Url.Action("edit", new {  id = item.TagID  }) %>">
                <img src="<%: Url.Content("~/Content/images/icons/pencil.png") %>" alt="Edit" title="Edit" /></a>    
            </td>
            <td align="center" width="16">
                <% Html.RenderAction("DeleteButton", "Tag", new { tag = item }); %>
            </td> 
            <td align="center" width="50">
                <% Html.RenderAction("CountPosts", new { id = item.TagID }); %>
            </td>
            <td align="left" width="459">
                <%: item.TagName %>
            </td>
            <td align="left" width="459">
                <%: item.FriendlyUrl %>
            </td>
        </tr>
    
    <% } %>

    </table>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>

